package com.jcoinexchage.user.common.vo;




import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;


//@ApiModel
@Data
public class RegisterTelReq {

     @NotBlank(message = "Phone cannot be empty")
     @Size(min = 11,max = 11,message = "The phone number can only be 11 digits")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "Malformed phone number")
    private String tel;

     @NotBlank(message = "区号不能为空")
    private String areaCode;

     @NotBlank(message = "verification code must be filled")
     @Size(min = 6,max = 6,message = "Verification code format error")
    private String code;

    @NotNull(message = "pwd can not be blank")
    @Pattern(regexp = "^[a-zA-Z0-9]{8,20}$", message = "The password can only be 8 to 20 letters and numbers")
    private String password;
}
